Optimal. Leaf size=65 \[ \frac{(a B+A b) \tan (c+d x)}{d}-\frac{(a A-b B) \log (\cos (c+d x))}{d}-x (a B+A b)+\frac{b B \tan ^2(c+d x)}{2 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0585006, antiderivative size = 65, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 27, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.111, Rules used = {3592, 3525, 3475} \[ \frac{(a B+A b) \tan (c+d x)}{d}-\frac{(a A-b B) \log (\cos (c+d x))}{d}-x (a B+A b)+\frac{b B \tan ^2(c+d x)}{2 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3592
Rule 3525
Rule 3475
Rubi steps
\begin{align*} \int \tan (c+d x) (a+b \tan (c+d x)) (A+B \tan (c+d x)) \, dx &=\frac{b B \tan ^2(c+d x)}{2 d}+\int \tan (c+d x) (a A-b B+(A b+a B) \tan (c+d x)) \, dx\\ &=-(A b+a B) x+\frac{(A b+a B) \tan (c+d x)}{d}+\frac{b B \tan ^2(c+d x)}{2 d}+(a A-b B) \int \tan (c+d x) \, dx\\ &=-(A b+a B) x-\frac{(a A-b B) \log (\cos (c+d x))}{d}+\frac{(A b+a B) \tan (c+d x)}{d}+\frac{b B \tan ^2(c+d x)}{2 d}\\ \end{align*}
Mathematica [A] time = 0.271831, size = 67, normalized size = 1.03 \[ \frac{-2 (a B+A b) \tan ^{-1}(\tan (c+d x))+2 (a B+A b) \tan (c+d x)+2 (b B-a A) \log (\cos (c+d x))+b B \tan ^2(c+d x)}{2 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.013, size = 105, normalized size = 1.6 \begin{align*}{\frac{B \left ( \tan \left ( dx+c \right ) \right ) ^{2}b}{2\,d}}+{\frac{A\tan \left ( dx+c \right ) b}{d}}+{\frac{B\tan \left ( dx+c \right ) a}{d}}+{\frac{a\ln \left ( 1+ \left ( \tan \left ( dx+c \right ) \right ) ^{2} \right ) A}{2\,d}}-{\frac{\ln \left ( 1+ \left ( \tan \left ( dx+c \right ) \right ) ^{2} \right ) Bb}{2\,d}}-{\frac{A\arctan \left ( \tan \left ( dx+c \right ) \right ) b}{d}}-{\frac{aB\arctan \left ( \tan \left ( dx+c \right ) \right ) }{d}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.49162, size = 89, normalized size = 1.37 \begin{align*} \frac{B b \tan \left (d x + c\right )^{2} - 2 \,{\left (B a + A b\right )}{\left (d x + c\right )} +{\left (A a - B b\right )} \log \left (\tan \left (d x + c\right )^{2} + 1\right ) + 2 \,{\left (B a + A b\right )} \tan \left (d x + c\right )}{2 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.93071, size = 161, normalized size = 2.48 \begin{align*} \frac{B b \tan \left (d x + c\right )^{2} - 2 \,{\left (B a + A b\right )} d x -{\left (A a - B b\right )} \log \left (\frac{1}{\tan \left (d x + c\right )^{2} + 1}\right ) + 2 \,{\left (B a + A b\right )} \tan \left (d x + c\right )}{2 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 0.297419, size = 104, normalized size = 1.6 \begin{align*} \begin{cases} \frac{A a \log{\left (\tan ^{2}{\left (c + d x \right )} + 1 \right )}}{2 d} - A b x + \frac{A b \tan{\left (c + d x \right )}}{d} - B a x + \frac{B a \tan{\left (c + d x \right )}}{d} - \frac{B b \log{\left (\tan ^{2}{\left (c + d x \right )} + 1 \right )}}{2 d} + \frac{B b \tan ^{2}{\left (c + d x \right )}}{2 d} & \text{for}\: d \neq 0 \\x \left (A + B \tan{\left (c \right )}\right ) \left (a + b \tan{\left (c \right )}\right ) \tan{\left (c \right )} & \text{otherwise} \end{cases} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.6015, size = 832, normalized size = 12.8 \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]